<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script>
  window.onload = function () {
    let btn1 = document.getElementById("btn1")
    btn1.addEventListener("click", function () {
      alert("a")
    })
    btn1.addEventListener("click", function () {
      alert("b")
    })
  }

</script>

<body>
  <input id="btn1" type="button" value="按钮" />

</body>

</html>